package com.battery.system.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.battery.common.annotation.Excel;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 租借订单对象 ws_used
 *
 * @author battery
 * @date 2021-01-22
 */
@Table(name = "ws_used")
public class Used {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @Id
    @KeySql(useGeneratedKeys = true)
    private String id;

    /**
     * 订单渠道 微信 1 支付宝 2
     */
    @Excel(name = "订单渠道 微信 1 支付宝 2")
    private Integer channel;

    /**
     * 订单号
     */
    @Excel(name = "订单号")
    private String orderNumber;

    /**
     * 租借类型押金租借 1免押租借 2线租借 3
     */
    @Excel(name = "租借类型押金租借 1免押租借 2线租借 3")
    private Integer borrowMode;

    /**
     * 项目ID
     */
    @Excel(name = "项目ID")
    private String projectId;

    /**
     * 直属合作商ID
     */
    @Excel(name = "直属合作商ID")
    private String partnerId;

    /**
     * 直属商户ID
     */
    @Excel(name = "直属商户ID")
    private String merchantId;

    /**
     * 门店ID
     */
    @Excel(name = "门店ID")
    private String storeId;

    /**
     * 用户ID
     */
    @Excel(name = "用户ID")
    private String appUserId;

    /**
     * 使用时长
     */
    @Excel(name = "使用时长")
    private String usingTime;

    /**
     * 实付金额
     */
    @Excel(name = "实付金额")
    private BigDecimal amountPaid;

    /**
     * 优惠金额
     */
    @Excel(name = "优惠金额")
    private BigDecimal discountAmount;

    /**
     * 退款金额
     */
    @Excel(name = "退款金额")
    private BigDecimal refundAmount;

    /**
     * 虚拟订单ID - 用于押金租借
     */
    @Excel(name = "虚拟订单ID - 用于押金租借")
    private String falseOrderId;

    /**
     * 真实订单ID
     */
    @Excel(name = "真实订单ID")
    private String trueOrderId;

    /**
     * 是否归还 0 未归还 1 归还
     */
    @Excel(name = "是否归还 0 未归还 1 归还")
    private Integer isBack;

    /**
     * 订单状态 0 待支付 1 已支付 2 已购买
     */
    @Excel(name = "订单状态 0 待支付 1 已支付 2 已购买")
    private Integer status;

    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date paymentTime;


    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;


    private Integer leaseState;


    // 套餐描述
    private String mealContent;


    // 门店名称
    private String storeName;


    // 线密码
    private String password;


    // 扣费描述（用于后台结束租借订单）
    private String endReason;


    private Integer isM;


    private String returnStore;


    private Integer isActivity;


    private Integer isFree;


    public Integer getIsFree() {
        return isFree;
    }

    public void setIsFree(Integer isFree) {
        this.isFree = isFree;
    }

    public String getReturnStore() {
        return returnStore;
    }

    public void setReturnStore(String returnStore) {
        this.returnStore = returnStore;
    }

    public Integer getIsActivity() {
        return isActivity;
    }

    public void setIsActivity(Integer isActivity) {
        this.isActivity = isActivity;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getLeaseState() {
        return leaseState;
    }

    public void setLeaseState(Integer leaseState) {
        this.leaseState = leaseState;
    }


    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }


    public Integer getChannel() {
        return channel;
    }

    public void setChannel(Integer channel) {
        this.channel = channel;
    }

    public Integer getBorrowMode() {
        return borrowMode;
    }

    public void setBorrowMode(Integer borrowMode) {
        this.borrowMode = borrowMode;
    }


    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public String getOrderNumber() {
        return orderNumber;
    }


    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public String getProjectId() {
        return projectId;
    }

    public void setPartnerId(String partnerId) {
        this.partnerId = partnerId;
    }

    public String getPartnerId() {
        return partnerId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public String getMerchantId() {
        return merchantId;
    }

    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }

    public String getStoreId() {
        return storeId;
    }

    public void setAppUserId(String appUserId) {
        this.appUserId = appUserId;
    }

    public String getAppUserId() {
        return appUserId;
    }


    public void setAmountPaid(BigDecimal amountPaid) {
        this.amountPaid = amountPaid;
    }

    public BigDecimal getAmountPaid() {
        return amountPaid;
    }

    public void setDiscountAmount(BigDecimal discountAmount) {
        this.discountAmount = discountAmount;
    }

    public BigDecimal getDiscountAmount() {
        return discountAmount;
    }

    public void setRefundAmount(BigDecimal refundAmount) {
        this.refundAmount = refundAmount;
    }

    public BigDecimal getRefundAmount() {
        return refundAmount;
    }

    public void setFalseOrderId(String falseOrderId) {
        this.falseOrderId = falseOrderId;
    }

    public String getFalseOrderId() {
        return falseOrderId;
    }

    public void setTrueOrderId(String trueOrderId) {
        this.trueOrderId = trueOrderId;
    }

    public String getTrueOrderId() {
        return trueOrderId;
    }

    public void setIsBack(Integer isBack) {
        this.isBack = isBack;
    }

    public Integer getIsBack() {
        return isBack;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    public void setPaymentTime(Date paymentTime) {
        this.paymentTime = paymentTime;
    }

    public Date getPaymentTime() {
        return paymentTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }


    public String getMealContent() {
        return mealContent;
    }

    public void setMealContent(String mealContent) {
        this.mealContent = mealContent;
    }

    public String getStoreName() {
        return storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }


    public String getEndReason() {
        return endReason;
    }

    public void setEndReason(String endReason) {
        this.endReason = endReason;
    }


    public Integer getIsM() {
        return isM;
    }

    public void setIsM(Integer isM) {
        this.isM = isM;
    }


    public String getUsingTime() {
        return usingTime;
    }

    public void setUsingTime(String usingTime) {
        this.usingTime = usingTime;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("channel", getChannel())
                .append("orderNumber", getOrderNumber())
                .append("borrowMode", getBorrowMode())
                .append("projectId", getProjectId())
                .append("partnerId", getPartnerId())
                .append("merchantId", getMerchantId())
                .append("storeId", getStoreId())
                .append("appUserId", getAppUserId())
                .append("amountPaid", getAmountPaid())
                .append("discountAmount", getDiscountAmount())
                .append("refundAmount", getRefundAmount())
                .append("createTime", getCreateTime())
                .append("falseOrderId", getFalseOrderId())
                .append("trueOrderId", getTrueOrderId())
                .append("isBack", getIsBack())
                .append("status", getStatus())
                .append("paymentTime", getPaymentTime())
                .toString();
    }
}
